package com.greatchn.authorization_server.web.srv;

import com.greatchn.authorization_server.web.dao.IOauthConfigDao;
import com.greatchn.authorization_server.web.po.OauthConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @OauthConfigSrv: OauthConfig srv
 * @author: ZBoHang
 * @time: 2023/2/28 13:56
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class OauthConfigSrv {

    @Autowired
    private IOauthConfigDao iOauthConfigDao;

    /**
     * get by key
     */
    public OauthConfig getValidConfigByKey(String key) {

        return this.iOauthConfigDao.getOne(key);
    }
}
